from myelin.Ns import MYELIN, DCMITYPE
from myelin.server.nodetype.Transform import TransformMap

BasicChain = [
    TransformMap((
        '%(xslt-base-uri)sformats/html/%(app-key)s/layout-%(method)s.xslt',
        '%(xslt-base-uri)sformats/html/%(app-key)s/%(type-key)s/%(xslt-base-name)s.xslt',
        '%(xslt-base-uri)sformats/html/%(app-key)s/base.xslt',                           
        ), (
        '%(i18n-common-base-uri)sformats/html/%(app-key)s/%(type-key)s/%(xslt-base-name)s.xml',
        '%(i18n-theme-base-uri)sformats/html/%(app-key)s/%(type-key)s/%(xslt-base-name)s.xml',
        )
    )
]


class HTML:
    
    imt = u'text/html'
    label = u'HTML'
    classTypes = (MYELIN + u'VisualScreenAdaptation',)
    dcTypes = (DCMITYPE + u'Text',)
    
class XHTML(HTML):
    
    imt = u'application/xhtml+xml'
    label = u'XHTML'
    
    
EXTENSIONS_MAP = {
    'html'  : HTML,
    'xhtml' : XHTML,
}
